<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/Function Info.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>WinXMenu_Attach</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<style type="text/css">
<!--
.style3 {font-size: medium}
-->
</style>

<link href="../../WinXStyles.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	font-size: x-large;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style2 {
	font-size: large;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
-->
</style>
</head>

<body>
<h1 class="style1"><img src="../../WinX48.png" width="48" height="48" align="absmiddle"> <!-- InstanceBeginEditable name="title" -->WinXMenu_Attach<!-- InstanceEndEditable --></h1>
<hr>

<!-- InstanceBeginEditable name="Prototype" -->
<p>WinXMenu_Attach (subMenu, newParent, id) </p>
<!-- InstanceEndEditable --><!-- InstanceBeginEditable name="Description" -->
<p>Attaches a menu to an item in another menu, hence turning the menu into a sub menu.</p>
<!-- InstanceEndEditable -->
<table width="80%" border="1" cellpadding="0" cellspacing="0">
  <tr bgcolor="#CCCCCC">
    <th width="24%"><span class="style3">Parameter</span></th>
    <th width="76%"><span class="style3">Description</span></th>
  </tr>
  <!-- InstanceBeginRepeat name="Parameter Table" --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->subMenu<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The menu to attach <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->newParent<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The menu to attach the sub menu to <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceBeginRepeatEntry -->
  <tr bgcolor="#E8E8E8">
    <td><!-- InstanceBeginEditable name="Parameter" -->id<!-- InstanceEndEditable --></td>
    <td><!-- InstanceBeginEditable name="Description" -->The id of the menu item to attach the sub menu to <!-- InstanceEndEditable --></td>
  </tr>
  <!-- InstanceEndRepeatEntry --><!-- InstanceEndRepeat -->
</table>
<h3>Returns</h3>
<!-- InstanceBeginEditable name="Return Info" -->
<p>$$TRUE on success or $$FALSE on fail </p>
<!-- InstanceEndEditable -->
<h3>Remarks</h3>
<!-- InstanceBeginEditable name="Remarks" -->
<p>none</p>
<!-- InstanceEndEditable -->
<h3>Examples</h3>
<table width="80%"  border="0">
  <tr>
    <td bgcolor="#C6C6FF"><!-- InstanceBeginEditable name="Example Code" -->
      <p class="codeStyle">'define ids for the main menu bar <br>
  $$ID_FILE =100<br>
  $$ID_EDIT = 101<br>
  $$ID_VIEW = 102 <br>
  $$ID_HELP =103<br>
  <br>
  'define constants for the file sub menu<br>
  $$ID_FILE_NEW = 200 <br>
  $$ID_FILE_OPEN = 201 <br>
  $$ID_FILE_SAVE = 202 <br>
  $$ID_FILE_SAVEAS = 203 <br>
  $$ID_FILE_EXIT
   = 204<br>
        <br>
        'make the main menu
        <br>
      hMenu = WinXNewMenu (&quot;&amp;File, &amp;Edit, &amp;View, &amp;Help&quot;, $$ID_FILE)<br>
      <br>
      'make the file sub menu<br>
      hSub = WinXNewMenu (&quot;&amp;New, &amp;Open, &amp;Save, Save &amp;As, , &amp;Exit&quot;, $$ID_FILE_NEW)
      <br>
      <br>
      'attach the file sub menu to the main menu bar<br>
      WinXMenu_Attach (hSub, hMenu, $$ID_FILE)</p>
      <!-- InstanceEndEditable --></td>
  </tr>
</table>

<h2 class="style2">Related Links</h2>
<!-- InstanceBeginEditable name="Related Links" -->
<p><a href="WinXNewMenu.htm">WinXNewMenu</a></p>
<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>
